<template>
  <view class="basic-image-container">
    <img v-show="!noImage" :src="src" alt="" @error="noImage = true" @load="noImage = false" :style="costomerStyle">
    <img v-show="noImage" :src="errorSrc" alt="" :style="costomerStyle">
  </view>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    costomerStyle: {
      type: Object,
      default: {}
    },
    src: {
      type: String,
      default: ""
    },
    errorSrc: {
      type: String,
      default: ""
    },
    mode: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      noImage: false
    }
  }
})
</script>
<style lang="scss" scoped>
.basic-image-container {
  display: inline;
}
</style>